Skip to content

fix(acp): deliver forum mentions under the default subscription - #5945

Open
Chessing234 wants to merge 4 commits into
block:mainfrom
Chessing234:fix/acp-forum-mentions
Open

fix(acp): deliver forum mentions under the default subscription#5945
Chessing234 wants to merge 4 commits into
block:mainfrom
Chessing234:fix/acp-forum-mentions

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Fixes #5268.

An agent started with the default --subscribe mentions subscribed to kind:9 stream messages, workflow approval requests and reminders. Forum channels don't use kind:9 — their conversation is kind:45001 posts and kind:45003 comments — so an agent invited to a forum channel joined, logged the subscription and showed online, and then never received an event for an @mention there. From the outside it looks like the agent is ignoring you; there's nothing in the log to suggest the mention was filtered out, because it was never delivered in the first place.

Both forum kinds are now in the default list.

  • --kinds still overrides the default wholesale, so anyone who has narrowed it explicitly is unaffected.
  • The three kinds the mode covered before are still covered, and a test asserts that, so a later edit can't quietly narrow it.
  • The list moved out of an inline closure in tokio_main into default_mention_kinds() (first commit, no behaviour change) so it's testable and visible next to the other subscription helpers.

Verified locally on the pinned 1.95.0 toolchain:

  • cargo test -p buzz-acp --lib — 780 passed (778 before, plus the two new)
  • cargo clippy -p buzz-acp --all-targets -- -D warnings — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean

Note: I'm an outside contributor, so the workflow runs on this PR will sit at action_required until a maintainer approves them; only the DCO check reports on its own.

The kind list for `--subscribe mentions` was an inline `unwrap_or_else`
closure buried in `tokio_main`, which is where a subscription gap can sit
unnoticed for a long time. Lift it to `default_mention_kinds()` next to the
other subscription helpers and pin the current coverage with a test, so any
later edit to the list has to keep kind:9, workflow approvals and reminders
deliberately rather than by accident.

No behaviour change.

Signed-off-by: Taksh <takshkothari09@gmail.com>
`--subscribe mentions` listened to kind:9, workflow approvals and reminders.
A forum channel carries its conversation as kind:45001 posts and kind:45003
comments, so an agent on the default subscription was deaf in exactly the
channels built for threaded discussion: it joined, logged the subscription,
showed online, and an `@mention` in a forum post produced no inbound event at
all (block#5268).

Add both forum kinds to the default list. `--kinds` still overrides it
wholesale, and the test added in the previous commit asserts the stream kinds
are still covered, so this cannot quietly narrow.

Signed-off-by: Taksh <takshkothari09@gmail.com>
@Chessing234
Chessing234 requested a review from a team as a code owner August 15, 2026 11:17

@themiguelamador themiguelamador left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for two related default-subscription gaps:

  1. default_mention_kinds() adds the forum kinds but still omits KIND_STREAM_MESSAGE_V2 (40002). That is a canonical message kind and the core/DB/desktop mention paths treat kinds 9 and 40002 together. As written, an ACP agent remains deaf to direct mentions in v2 stream messages under the default subscription.
  2. crates/buzz-acp/README.md still says forum traffic requires an explicit opt-in, and its --kinds examples omit 40002. Because --kinds replaces the default list wholesale, following those examples preserves the same coverage hole.

I fixed both issues in 9c10866b1: the default now covers stream v1/v2, forum posts/comments, control, and slash commands, while the README accurately distinguishes default mentioned-forum delivery from an all-forum subscription.

Verification:

  • cargo fmt --all -- --check
  • cargo test -p buzz-acp --lib — 780 passed
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • git diff --check

…iption

Review: `default_mention_kinds()` gained the forum kinds but still omitted
`KIND_STREAM_MESSAGE_V2` (40002). Kinds 9 and 40002 are both canonical stream
message kinds and the rest of the codebase treats them as a pair —
`buzz-db`'s mentions query selects `(9, 40002, 45001, 45003)` together, and
the relay's ingest path matches them in the same arm.

With only 9 in the list an agent on the default subscription stays deaf to
direct mentions in v2 stream messages: the same shape of bug this PR is
fixing for forum channels, one kind over.

- `cargo test -p buzz-acp --lib` — 781 passed
- `cargo clippy -p buzz-acp --all-targets -- -D warnings`
- `cargo fmt --all -- --check`

Signed-off-by: Taksh <takshkothari09@gmail.com>
Review: the README still described forum traffic as requiring an explicit
opt-in, which this change makes untrue for the mentioned case — a forum post
or comment that @mentions the agent is now delivered by default.

Its `--kinds` examples also omitted 40002. That matters more than it looks:
`--kinds` replaces the default list wholesale rather than adding to it, so
anyone following an example inherited the same coverage hole the previous
commit just closed. The examples now carry the full set, and the note says
explicitly that the flag replaces rather than extends.

The section now distinguishes the two things it was conflating: mentioned
forum delivery, which is the default, and an all-forum subscription including
votes and unmentioned posts, which still needs `--no-mention-filter`.

Signed-off-by: Taksh <takshkothari09@gmail.com>
@Chessing234

Copy link
Copy Markdown
Contributor Author

Both right, one commit each. 9c10866b1 wasn't reachable (Complear/buzz 404s), so written from your description.

1. KIND_STREAM_MESSAGE_V2. Confirmed and added. The pairing is consistent across the codebase — buzz-db's mentions query selects (9, 40002, 45001, 45003) together (feed.rs), and the relay's ingest path matches them in the same arm — so leaving 40002 out was the same bug this PR fixes for forum channels, one kind over. Default is now stream v1/v2, forum posts/comments, approval requests and reminders.

2. README. Rewritten. It now says mentioned forum delivery is the default and that what still needs opting in is all forum traffic — unmentioned posts and votes (45002), which are never mentions. Every --kinds example carries 40002, and there's an explicit note that --kinds replaces the default list rather than extending it, since that's what made the stale examples actively harmful.

Verification:

  • cargo test -p buzz-acp --lib — 781 passed
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • cargo fmt --all -- --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buzz-acp: subscribe=mentions never receives forum-post mentions (kinds 45001/45003)

2 participants